package com.starlight.flower_server.infrastructure.repository;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.starlight.flower_server.domain.article.cqrs.ArticlePageQuery;
import com.starlight.flower_server.infrastructure.entity.Article;

import java.util.List;

/**
 * @Author yfy2001
 * @date 2023/4/13 14:37
 */
public interface ArticleRepository {

    Article queryDetail(Long id);

    Integer logicDelete(Long id);

    Integer insert(Article article);

    Integer modify(Article article);

    Integer addCommentNumByArticleId(Long articleId,Integer num);

    Integer addHitByArticleId(Long articleId);

    IPage<Article> queryPage(ArticlePageQuery query);

    List<Article> queryAll();

    Long queryTotalCount();

    List<Article> queryRandom(Integer count);
}
